import 'dart:typed_data';

import 'package:flutter/services.dart';

class OssPlugs {
  static const MethodChannel _channel = MethodChannel("flutter_oss_plugs");

  ///单对象上传 filePath跟dataBytes二选一 如果二个同时传优先以filePath
  ///@params ossPath 需要上传到服务器的路径
  ///@params dataBytes 需要上专的文件二进度数据包
  static Future<String> singleUploadBytes({required String ossPath,required Uint8List dataBytes})async{
    var res=await _channel.invokeMethod<String>("singleUploadBytes",{
      "ossPath":ossPath,
      "dataBytes":dataBytes
    });
    return Future.value(res);
  }
}